enum class ClassToEnum {
    Foo,
    Bar,
    Baz
}

enum class ObjectToEnum {
    Foo,
    Bar
}

class EnumToClass {
    class Foo
    object Bar
    inner class Baz
}

object EnumToObject {
    class Foo
    object Bar
}

object ClassToObject
class ObjectToClass

interface ClassToInterface

class NestedObjectToCompanion1 {
    companion object {
        fun name() = "NestedObjectToCompanion1.Companion"
        override fun toString() = name()
    }
}

class NestedObjectToCompanion2 {
    companion object Foo {
        fun name() = "NestedObjectToCompanion2.Foo"
        override fun toString() = name()
    }
}

class CompanionToNestedObject1 {
    object Companion {
        fun name() = "CompanionToNestedObject1.Companion"
        override fun toString() = name()
    }
}

class CompanionToNestedObject2 {
    object Foo {
        fun name() = "CompanionToNestedObject2.Foo"
        override fun toString() = name()
    }
}

class CompanionAndNestedObjectsSwap {
    object Foo {
        fun name() = "Foo"
    }

    companion object Bar {
        fun name() = "Bar"
    }
}

class NestedClassContainer {
    fun name() = "NestedClassContainer"

    inner class NestedToInner {
        fun name() = this@NestedClassContainer.name() + ".NestedToInner"
        override fun toString() = name()

        inner class /*object*/ Object {
            fun name() = this@NestedToInner.name() + ".Object"
            override fun toString() = name()
        }

        inner class /*companion object*/ Companion {
            fun name() = this@NestedToInner.name() + ".Companion"
            override fun toString() = name()
        }

        inner class /*class*/ Nested {
            fun name() = this@NestedToInner.name() + ".Nested"
            override fun toString() = name()
        }

        inner class Inner {
            fun name() = this@NestedToInner.name() + ".Inner"
            override fun toString() = name()
        }
    }
}

class InnerClassContainer {
    fun name() = "InnerClassContainer"

    class InnerToNested {
        fun name() = "InnerClassContainer.InnerToNested"
        override fun toString() = name()

        object Object {
            fun name() = "InnerClassContainer.InnerToNested.Companion"
            override fun toString() = name()
        }

        companion object Companion {
            fun name() = "InnerClassContainer.InnerToNested.Companion"
            override fun toString() = name()
        }

        class Nested {
            fun name() = "InnerClassContainer.InnerToNested.Nested"
            override fun toString() = name()
        }

        inner class Inner {
            fun name() = this@InnerToNested.name() + ".Inner"
            override fun toString() = name()
        }
    }
}

annotation class AnnotationClassWithChangedParameterType(val x: /*Int*/ String)
/*annotation*/ class AnnotationClassThatBecomesRegularClass(val x: Int) { override fun toString() = "AnnotationClassThatBecomesRegularClass[x=$x]" }
//annotation class AnnotationClassThatDisappears(val x: Int)
annotation class AnnotationClassWithRenamedParameters(val xi: Int, val xs: String)
annotation class AnnotationClassWithReorderedParameters(val s: String, val i: Int)
annotation class AnnotationClassWithNewParameter(val i: Int, val s: String = "Apple")

class ValueToClass(val x: Int)
value class ClassToValue(val x: Int)

/*data*/ class DataToClass(val x: Int, val y: Int)

abstract class ClassToAbstractClass {
    abstract var name: String
    fun getGreeting() = "Hello, $name!"
}

//class RemovedClass
enum class EnumClassWithDisappearingEntry { UNCHANGED, /*REMOVED*/ }

object PublicTopLevelLib1 {
    private annotation class AnnotationClassThatBecomesPrivate
    private class ClassThatBecomesPrivate
    private enum class EnumClassThatBecomesPrivate { ENTRY }
}
